package Objet;

@SuppressWarnings("rawtypes")
public class Objet implements java.lang.Comparable {
	private final int num;
	public boolean place;
	private final int poids;
	
	public Objet(int num, int poids) {
		this.num = num;
		this.poids = poids;
		this.place = false;
	}
	
	@Override
	public int compareTo(Object t2) {
		if (this.getPoids() < ((Objet) t2).getPoids()) {
			return 1;
		} else
			if (this.getPoids() == ((Objet) t2).getPoids()) {
				return 0;
			} else {
				return -1;
			}
	}
	
	public int getNum() {
		return this.num;
	}
	
	public int getPoids() {
		return this.poids;
	}
	
	public boolean isPlace() {
		return this.place;
	}
	
	public void setPlace(boolean place) {
		this.place = place;
	}
	
}